package org.ims.inv.model.system;

import cn.trymore.core.model.ModelBase;

/**
 * Model: 用户角色
 * 
 * @author Jeccy.Zhao
 *
 */
public class ModelAppRole
extends ModelBase
{
	/**
	 * Serial UID
	 */
	private static final long serialVersionUID = 1743195817784207726L;
	
	/**
	 * 超级管理员
	 */
	public static final String ROLE_SUPER = "ROLE_SUPER";
	
	/**
	 * 系统管理员
	 */
	public static final String ROLE_ADMIN = "ROLE_ADMIN";
	
	/**
	 * 公共角色
	 */
	public static final String ROLE_PUBLIC = "ROLE_PUBLIC";
	
	/**
	 * 项目部长
	 */
	public static final String ROLE_PROJECT_MASTER = "ROLE_PROJECT_MASTER";
	
	/**
	 * 项目院领导
	 */
	public static final String ROLE_PROJECT_LEADER = "ROLE_PROJECT_LEADER_";
	
	/**
	 * 匿名角色
	 */
	public static final String ROLE_ANONYMOUS = "ROLE_ANONYMOUS";
	
	/**
	 * 超级管理员的角色ID
	 */
	public static final String SUPER_ROLEID = String.valueOf(1L);
	
	/**
	 * 超级权限
	 */
	public static final String SUPER_RIGHTS = "__ALL";
	
	/**
	 * 角色名称
	 */
	private String roleName;
	
	/**
	 * 角色标识符
	 */
	private String roleKey;
	
	/**
	 * 角色描述
	 */
	private String roleDesc;
	
	/**
	 * 标志: 管理员角色
	 */
	private Integer roleAdminFlag;
	
	/**
	 * 角色状态
	 */
	private Integer roleStatus;
	
	/**
	 * 角色属性
	 */
	private Integer roleProperty;

	/**
	 * The enumeration of role property
	 * 
	 * @author Jeccy.Zhao
	 *
	 */
	public static enum ERoleProperty
	{
		COMMON(0, "common"),				// 无
		LEADERSHIP(1, "leadership");		// 项目高层
		
		private Integer value;
		private String text;
		
		ERoleProperty (Integer value, String text)
		{
			this.value = value;
			this.text = text;
		}
		
		public Integer getValue(){
			return value;
		}
		
		public String getText()
		{
			return this.text;
		}
	}
	
	/**
	 * The enumeration of role admin flag
	 * 
	 * @author Jeccy.Zhao
	 *
	 */
	public static enum ERoleAdminFlag
	{
		COMMON(0, "common"),	// 普通员工
		ADMINI(1, "admin");		// 系统管理员
		
		private Integer value;
		private String text;
		
		ERoleAdminFlag (Integer value, String text)
		{
			this.value = value;
			this.text = text;
		}
		
		public Integer getValue(){
			return value;
		}
		
		public String getText()
		{
			return this.text;
		}
	}
	
	public String getRoleName()
	{
		return roleName;
	}

	public void setRoleName(String roleName)
	{
		this.roleName = roleName;
	}

	public String getRoleDesc()
	{
		return roleDesc;
	}

	public void setRoleDesc(String roleDesc)
	{
		this.roleDesc = roleDesc;
	}

	public Integer getRoleAdminFlag()
	{
		return roleAdminFlag;
	}

	public void setRoleAdminFlag(Integer roleAdminFlag)
	{
		this.roleAdminFlag = roleAdminFlag;
	}

	public Integer getRoleStatus()
	{
		return roleStatus;
	}

	public void setRoleStatus(Integer roleStatus)
	{
		this.roleStatus = roleStatus;
	}

	public void setRoleKey(String roleKey)
	{
		this.roleKey = roleKey;
	}

	public String getRoleKey()
	{
		return roleKey;
	}

	public void setRoleProperty(Integer roleProperty)
	{
		this.roleProperty = roleProperty;
	}

	public Integer getRoleProperty()
	{
		return roleProperty;
	}
	
}
